#ifndef __THREAD_H__
#define __THREAD_H__

#include <pthread.h>
#include <functional>


namespace rocket 
{
using std::function;

class thread
{
public:
    thread();
    ~thread();
    void start();
    void join();
private:
//    virtual void run()=0;
    static void *door(void *);

protected:
    function<void()> _f;

private:
    pthread_t _id=0;
};

}

#endif